Left Termination of the query pattern der_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

der(d(e(t)), const(1)).
der(d(e(const(A))), const(0)).
der(d(e(+(X, Y))), +(DX, DY)) :- ','(der(d(e(X)), DX), der(d(e(Y)), DY)).
der(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) :- ','(der(d(e(X)), DX), der(d(e(Y)), DY)).
der(d(d(X)), DDX) :- ','(der(d(X), DX), der(d(e(DX)), DDX)).

Queries:

der(g,a).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

DER_IN(d(d(X)), DDX) → U51(X, DDX, der_in(d(X), DX))
DER_IN(d(d(X)), DDX) → DER_IN(d(X), DX)
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, der_in(d(e(X)), DX))
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → DER_IN(d(e(X)), DX)
DER_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, der_in(d(e(X)), DX))
DER_IN(d(e(+(X, Y))), +(DX, DY)) → DER_IN(d(e(X)), DX)
U11(X, Y, DX, DY, der_out(d(e(X)), DX)) → U21(X, Y, DX, DY, der_in(d(e(Y)), DY))
U11(X, Y, DX, DY, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, der_out(d(e(X)), DX)) → U41(X, Y, DY, DX, der_in(d(e(Y)), DY))
U31(X, Y, DY, DX, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
U51(X, DDX, der_out(d(X), DX)) → U61(X, DDX, DX, der_in(d(e(DX)), DDX))
U51(X, DDX, der_out(d(X), DX)) → DER_IN(d(e(DX)), DDX)

The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x4)
U51(x1, x2, x3)  =  U51(x3)
U41(x1, x2, x3, x4, x5)  =  U41(x1, x2, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x1, x2, x5)
U21(x1, x2, x3, x4, x5)  =  U21(x3, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x2, x5)
U61(x1, x2, x3, x4)  =  U61(x4)
DER_IN(x1, x2)  =  DER_IN(x1)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

DER_IN(d(d(X)), DDX) → U51(X, DDX, der_in(d(X), DX))
DER_IN(d(d(X)), DDX) → DER_IN(d(X), DX)
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, der_in(d(e(X)), DX))
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → DER_IN(d(e(X)), DX)
DER_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, der_in(d(e(X)), DX))
DER_IN(d(e(+(X, Y))), +(DX, DY)) → DER_IN(d(e(X)), DX)
U11(X, Y, DX, DY, der_out(d(e(X)), DX)) → U21(X, Y, DX, DY, der_in(d(e(Y)), DY))
U11(X, Y, DX, DY, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, der_out(d(e(X)), DX)) → U41(X, Y, DY, DX, der_in(d(e(Y)), DY))
U31(X, Y, DY, DX, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
U51(X, DDX, der_out(d(X), DX)) → U61(X, DDX, DX, der_in(d(e(DX)), DDX))
U51(X, DDX, der_out(d(X), DX)) → DER_IN(d(e(DX)), DDX)

The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x4)
U51(x1, x2, x3)  =  U51(x3)
U41(x1, x2, x3, x4, x5)  =  U41(x1, x2, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x1, x2, x5)
U21(x1, x2, x3, x4, x5)  =  U21(x3, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x2, x5)
U61(x1, x2, x3, x4)  =  U61(x4)
DER_IN(x1, x2)  =  DER_IN(x1)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

DER_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, der_in(d(e(X)), DX))
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → DER_IN(d(e(X)), DX)
U11(X, Y, DX, DY, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
DER_IN(d(e(+(X, Y))), +(DX, DY)) → DER_IN(d(e(X)), DX)
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, der_in(d(e(X)), DX))

The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x4)
U31(x1, x2, x3, x4, x5)  =  U31(x1, x2, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x2, x5)
DER_IN(x1, x2)  =  DER_IN(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

DER_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, der_in(d(e(X)), DX))
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → DER_IN(d(e(X)), DX)
U11(X, Y, DX, DY, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, der_out(d(e(X)), DX)) → DER_IN(d(e(Y)), DY)
DER_IN(d(e(+(X, Y))), +(DX, DY)) → DER_IN(d(e(X)), DX)
DER_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, der_in(d(e(X)), DX))

The TRS R consists of the following rules:

der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x1, x2, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x2, x5)
DER_IN(x1, x2)  =  DER_IN(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPOrderProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DER_IN(d(e(+(X, Y)))) → DER_IN(d(e(X)))
DER_IN(d(e(*(X, Y)))) → DER_IN(d(e(X)))
U31(X, Y, der_out(DX)) → DER_IN(d(e(Y)))
U11(Y, der_out(DX)) → DER_IN(d(e(Y)))
DER_IN(d(e(*(X, Y)))) → U31(X, Y, der_in(d(e(X))))
DER_IN(d(e(+(X, Y)))) → U11(Y, der_in(d(e(X))))

The TRS R consists of the following rules:

der_in(d(e(*(X, Y)))) → U3(X, Y, der_in(d(e(X))))
der_in(d(e(+(X, Y)))) → U1(Y, der_in(d(e(X))))
der_in(d(e(const(A)))) → der_out(const(0))
der_in(d(e(t))) → der_out(const(1))
U3(X, Y, der_out(DX)) → U4(X, Y, DX, der_in(d(e(Y))))
U1(Y, der_out(DX)) → U2(DX, der_in(d(e(Y))))
U4(X, Y, DX, der_out(DY)) → der_out(+(*(X, DY), *(Y, DX)))
U2(DX, der_out(DY)) → der_out(+(DX, DY))

The set Q consists of the following terms:

der_in(x0)
U3(x0, x1, x2)
U1(x0, x1)
U4(x0, x1, x2, x3)
U2(x0, x1)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


DER_IN(d(e(+(X, Y)))) → DER_IN(d(e(X)))
DER_IN(d(e(+(X, Y)))) → U11(Y, der_in(d(e(X))))
The remaining pairs can at least be oriented weakly.

DER_IN(d(e(*(X, Y)))) → DER_IN(d(e(X)))
U31(X, Y, der_out(DX)) → DER_IN(d(e(Y)))
U11(Y, der_out(DX)) → DER_IN(d(e(Y)))
DER_IN(d(e(*(X, Y)))) → U31(X, Y, der_in(d(e(X))))
Used ordering: Polynomial interpretation [25]:

POL(*(x1, x2)) = x1 + x2   
POL(+(x1, x2)) = 1 + x1 + x2   
POL(0) = 0   
POL(1) = 0   
POL(DER_IN(x1)) = x1   
POL(U1(x1, x2)) = 0   
POL(U11(x1, x2)) = x1   
POL(U2(x1, x2)) = 0   
POL(U3(x1, x2, x3)) = 0   
POL(U31(x1, x2, x3)) = x2   
POL(U4(x1, x2, x3, x4)) = 0   
POL(const(x1)) = 0   
POL(d(x1)) = x1   
POL(der_in(x1)) = 0   
POL(der_out(x1)) = 0   
POL(e(x1)) = x1   
POL(t) = 0   

The following usable rules [17] were oriented: none



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ DependencyGraphProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DER_IN(d(e(*(X, Y)))) → DER_IN(d(e(X)))
U11(Y, der_out(DX)) → DER_IN(d(e(Y)))
U31(X, Y, der_out(DX)) → DER_IN(d(e(Y)))
DER_IN(d(e(*(X, Y)))) → U31(X, Y, der_in(d(e(X))))

The TRS R consists of the following rules:

der_in(d(e(*(X, Y)))) → U3(X, Y, der_in(d(e(X))))
der_in(d(e(+(X, Y)))) → U1(Y, der_in(d(e(X))))
der_in(d(e(const(A)))) → der_out(const(0))
der_in(d(e(t))) → der_out(const(1))
U3(X, Y, der_out(DX)) → U4(X, Y, DX, der_in(d(e(Y))))
U1(Y, der_out(DX)) → U2(DX, der_in(d(e(Y))))
U4(X, Y, DX, der_out(DY)) → der_out(+(*(X, DY), *(Y, DX)))
U2(DX, der_out(DY)) → der_out(+(DX, DY))

The set Q consists of the following terms:

der_in(x0)
U3(x0, x1, x2)
U1(x0, x1)
U4(x0, x1, x2, x3)
U2(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ QDPOrderProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DER_IN(d(e(*(X, Y)))) → DER_IN(d(e(X)))
U31(X, Y, der_out(DX)) → DER_IN(d(e(Y)))
DER_IN(d(e(*(X, Y)))) → U31(X, Y, der_in(d(e(X))))

The TRS R consists of the following rules:

der_in(d(e(*(X, Y)))) → U3(X, Y, der_in(d(e(X))))
der_in(d(e(+(X, Y)))) → U1(Y, der_in(d(e(X))))
der_in(d(e(const(A)))) → der_out(const(0))
der_in(d(e(t))) → der_out(const(1))
U3(X, Y, der_out(DX)) → U4(X, Y, DX, der_in(d(e(Y))))
U1(Y, der_out(DX)) → U2(DX, der_in(d(e(Y))))
U4(X, Y, DX, der_out(DY)) → der_out(+(*(X, DY), *(Y, DX)))
U2(DX, der_out(DY)) → der_out(+(DX, DY))

The set Q consists of the following terms:

der_in(x0)
U3(x0, x1, x2)
U1(x0, x1)
U4(x0, x1, x2, x3)
U2(x0, x1)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


DER_IN(d(e(*(X, Y)))) → DER_IN(d(e(X)))
DER_IN(d(e(*(X, Y)))) → U31(X, Y, der_in(d(e(X))))
The remaining pairs can at least be oriented weakly.

U31(X, Y, der_out(DX)) → DER_IN(d(e(Y)))
Used ordering: Polynomial interpretation [25]:

POL(*(x1, x2)) = 1 + x1 + x2   
POL(+(x1, x2)) = 0   
POL(0) = 0   
POL(1) = 0   
POL(DER_IN(x1)) = x1   
POL(U1(x1, x2)) = 0   
POL(U2(x1, x2)) = 0   
POL(U3(x1, x2, x3)) = 0   
POL(U31(x1, x2, x3)) = x1 + x2   
POL(U4(x1, x2, x3, x4)) = 0   
POL(const(x1)) = 0   
POL(d(x1)) = x1   
POL(der_in(x1)) = 0   
POL(der_out(x1)) = 0   
POL(e(x1)) = x1   
POL(t) = 0   

The following usable rules [17] were oriented: none



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ QDPOrderProof
QDP
                                    ↳ DependencyGraphProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(X, Y, der_out(DX)) → DER_IN(d(e(Y)))

The TRS R consists of the following rules:

der_in(d(e(*(X, Y)))) → U3(X, Y, der_in(d(e(X))))
der_in(d(e(+(X, Y)))) → U1(Y, der_in(d(e(X))))
der_in(d(e(const(A)))) → der_out(const(0))
der_in(d(e(t))) → der_out(const(1))
U3(X, Y, der_out(DX)) → U4(X, Y, DX, der_in(d(e(Y))))
U1(Y, der_out(DX)) → U2(DX, der_in(d(e(Y))))
U4(X, Y, DX, der_out(DY)) → der_out(+(*(X, DY), *(Y, DX)))
U2(DX, der_out(DY)) → der_out(+(DX, DY))

The set Q consists of the following terms:

der_in(x0)
U3(x0, x1, x2)
U1(x0, x1)
U4(x0, x1, x2, x3)
U2(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

DER_IN(d(d(X)), DDX) → DER_IN(d(X), DX)

The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x4)
DER_IN(x1, x2)  =  DER_IN(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

DER_IN(d(d(X)), DDX) → DER_IN(d(X), DX)

R is empty.
The argument filtering Pi contains the following mapping:
d(x1)  =  d(x1)
DER_IN(x1, x2)  =  DER_IN(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DER_IN(d(d(X))) → DER_IN(d(X))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:


We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x1, x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x2, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS

Pi-finite rewrite system:
The TRS R consists of the following rules:

der_in(d(d(X)), DDX) → U5(X, DDX, der_in(d(X), DX))
der_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, der_in(d(e(X)), DX))
der_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, der_in(d(e(X)), DX))
der_in(d(e(const(A))), const(0)) → der_out(d(e(const(A))), const(0))
der_in(d(e(t)), const(1)) → der_out(d(e(t)), const(1))
U1(X, Y, DX, DY, der_out(d(e(X)), DX)) → U2(X, Y, DX, DY, der_in(d(e(Y)), DY))
U2(X, Y, DX, DY, der_out(d(e(Y)), DY)) → der_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, der_out(d(e(X)), DX)) → U4(X, Y, DY, DX, der_in(d(e(Y)), DY))
U4(X, Y, DY, DX, der_out(d(e(Y)), DY)) → der_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, der_out(d(X), DX)) → U6(X, DDX, DX, der_in(d(e(DX)), DDX))
U6(X, DDX, DX, der_out(d(e(DX)), DDX)) → der_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
der_in(x1, x2)  =  der_in(x1)
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x1, x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x2, x5)
U1(x1, x2, x3, x4, x5)  =  U1(x1, x2, x5)
const(x1)  =  const(x1)
0  =  0
der_out(x1, x2)  =  der_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x2, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x2, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)